package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 3:08:52 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbClaseContrib generated by hbm2java
 */
@Entity
@Table(name = "TB_CLASE_CONTRIB", schema = "CATALOGOS")
public class TbClaseContrib implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String cclase;
	private String cusuario;
	private Date fhingreso;
	private Integer bstatus;
	private String dclase;
	private Set<TbTipoContrib> tbTipoContribs = new HashSet<TbTipoContrib>(0);
	private Set<TbDocIdentidad> tbDocIdentidads = new HashSet<TbDocIdentidad>(0);

	public TbClaseContrib() {
	}

	public TbClaseContrib(String cclase, String cusuario, Date fhingreso,
			Integer bstatus) {
		this.cclase = cclase;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.bstatus = bstatus;
	}

	public TbClaseContrib(String cclase, String cusuario, Date fhingreso,
			Integer bstatus, String dclase, Set<TbTipoContrib> tbTipoContribs,
			Set<TbDocIdentidad> tbDocIdentidads) {
		this.cclase = cclase;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.bstatus = bstatus;
		this.dclase = dclase;
		this.tbTipoContribs = tbTipoContribs;
		this.tbDocIdentidads = tbDocIdentidads;
	}

	@Id
	@Column(name = "C_CLASE", unique = true, nullable = false, length = 1)
	public String getCclase() {
		return this.cclase;
	}

	public void setCclase(String cclase) {
		this.cclase = cclase;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Column(name = "B_STATUS", nullable = false, precision = 1, scale = 0)
	public Integer getBstatus() {
		return this.bstatus;
	}

	public void setBstatus(Integer bstatus) {
		this.bstatus = bstatus;
	}

	@Column(name = "D_CLASE", length = 8)
	public String getDclase() {
		return this.dclase;
	}

	public void setDclase(String dclase) {
		this.dclase = dclase;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbClaseContrib")
	public Set<TbTipoContrib> getTbTipoContribs() {
		return this.tbTipoContribs;
	}

	public void setTbTipoContribs(Set<TbTipoContrib> tbTipoContribs) {
		this.tbTipoContribs = tbTipoContribs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbClaseContrib")
	public Set<TbDocIdentidad> getTbDocIdentidads() {
		return this.tbDocIdentidads;
	}

	public void setTbDocIdentidads(Set<TbDocIdentidad> tbDocIdentidads) {
		this.tbDocIdentidads = tbDocIdentidads;
	}

}
